       IDENTIFICATION DIVISION.
           PROGRAM-ID. LIBOOK.
       ENVIRONMENT DIVISION.
           CONFIGURATION SECTION.
           SOURCE-COMPUTER.
           OBJECT-COMPUTER.
           INPUT-OUTPUT SECTION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 REC1.
          02  BOOK OCCURS 10 TIMES.
            03 TITLE  PIC X(20).
            03 ATR    PIC X(20).
            03 ACC    PIC 9(5).
       77 I           PIC 99 VALUE IS 0.
       77 NAME        PIC X(20).
       77 N           PIC 99.
       77 C           PIC X.
       
       PROCEDURE DIVISION. 
       MAINPARA.
           PERFORM GETDATA.
       FINDPARA.    
           PERFORM FINDER. 
           STOP RUN.
       
       GETDATA.
           DISPLAY "---DATA ENTRY---".
           DISPLAY (LIN, COL) "NO. OF BOOKS: ".
           ACCEPT N.
           PERFORM ULINE.
           PERFORM READ-PARA N TIMES.

       READ-PARA.
           ADD 1 TO I.
           DISPLAY (LIN, COL) "TITLE   : ".
           ACCEPT TITLE OF BOOK(I).
           DISPLAY (LIN, COL) "AUTHOR  : ".
           ACCEPT ATR OF BOOK(I).
           DISPLAY (LIN, COL) "ACCOUNT : ".
           ACCEPT ACC OF BOOK(I).
           PERFORM ULINE.

       FINDER.
           DISPLAY (1, 1) ERASE.
           DISPLAY (LIN, COL) "TITLE TO SEARCH: ".
           ACCEPT NAME.
           MOVE 1 TO I.
           PERFORM SEARCH-PARA.
           DISPLAY (LIN, COL) "CONTINUE <Y/N>?: ".
           ACCEPT C.
           IF C = 'Y' GO TO FINDER.
       
       SEARCH-PARA.
           MOVE 1 TO I.
           PERFORM S-PARA UNTIL NAME = TITLE OF BOOK(I) OR I > N.              
           IF I > N DISPLAY "---! NOT FOUND".
           IF I NOT > N PERFORM FOUND.
           PERFORM ULINE.
       FOUND.
           DISPLAY "---! FOUND".
           DISPLAY "TITLE   :", TITLE OF BOOK(I).
           DISPLAY "AUTHOR  :", ATR OF BOOK(I).
           DISPLAY "ACCOUNT :", ACC OF BOOK(I).
           
       S-PARA.
           IF NOT NAME = TITLE OF BOOK(I) ADD 1 TO I.

       ULINE.
           DISPLAY "----------------------------".
 





           
